package com.xnfh.home.ui.adapter

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.xnfh.common.bean.NzGlBeanItem
import com.xnfh.home.R

/**
 * @Description: 农资管理item
 * @Author: ziheng
 * @CreateDate: 2023/11/1 5:42 PM
 * @UpdateUser: ziheng
 * @UpdateDate: 2023/11/1 5:42 PM
 * @UpdateRemark: 更新说明
 */
class NzGlAdapter: BaseQuickAdapter<NzGlBeanItem,BaseViewHolder>(R.layout.item_nzgl_layout) {
    override fun convert(holder: BaseViewHolder, item: NzGlBeanItem) {
        holder.setText(R.id.item_nzgl_title,item.productionName)
        holder.setText(R.id.item_nzgl_time,item.farmTime)
        holder.setText(R.id.item_nzgl_sl_gg,"${context.resources.getString(R.string.str_sj_and_gg)}${item.num}${item.unitName} (${item.packingSize})")
        holder.setText(R.id.item_nzgl_price,"${context.resources.getString(R.string.str_price)}${item.agriMoney}")
        holder.setText(R.id.item_nzgl_zw,"${context.resources.getString(R.string.str_use_zw)}${item.cropName}")
        holder.setText(R.id.item_nzgl_use_name,"${context.resources.getString(R.string.str_use_name)}${item.agriStaff}")
    }
}